package com.portal.service.impl.system;

import java.util.List;

import com.portal.model.system.User;
import com.portal.service.impl.BaseService;
import com.portal.service.system.UserService;
import com.util.portal.PageConfig;

public class UserServiceImpl extends BaseService implements UserService {

	public Integer getRowCount(User test) {
		return this.getUserDao().getRowCount(test);
	}

	public User read(String id) {
		return this.getUserDao().read(id);
	}

	public List<User> getList(User user, PageConfig pageConfig) {
		if (pageConfig != null) {
			Integer rowcount = this.getUserDao().getRowCount(user);
			pageConfig.setTotalCount(rowcount);
			return this.getUserDao().getList(user,
					this.getRowBounds(pageConfig));
		} else {
			return this.getUserDao().getList(user);
		}
	}

	public void insert(User t) {
		this.getUserDao().insert(t);
	}

	public void update(User t) {
		this.getUserDao().update(t);
	}

	public void delete(String id) {
		this.getUserDao().delete(id);
	}
}
